package com.project.easy.common.framework.auth.core.exception;

import  com.project.easy.common.util.enums.exception.BusinessExceptionEnums;
import  com.project.easy.common.util.enums.exception.ExceptionEnums;
import  com.project.easy.common.util.exception.BaseException;
import  com.project.easy.common.util.string.StringUtil;

/**
 * @ClassName ParamRequireException
 * @Description  参数必须传
 * @Author GreatorMan.cool
 * @Date 2021/3/25 14:57
 * @Version 1.0
 **/
public class BusinessUserPasswordIllegalException extends BaseException {
    /**
     * 必传参数
     * @param subCode 子编码
     * @param subMsg 子消息
     */
    public BusinessUserPasswordIllegalException(String subCode, String subMsg) {
        super(ExceptionEnums.BUSINESS_EXCEPTION.getCode(), ExceptionEnums.BUSINESS_EXCEPTION.getName(), subCode, StringUtil.isBlank(subMsg) ? "用户密码不正确!" : subMsg);
    }
    /**
     * 参数异常
     * @param subMsg 异常消息
     */
    public BusinessUserPasswordIllegalException(String subMsg) {
        super(ExceptionEnums.BUSINESS_EXCEPTION.getCode(), ExceptionEnums.BUSINESS_EXCEPTION.getName(), BusinessExceptionEnums.BUSINESS_USER_PASSWORD_ILLEGAL.getCode(), StringUtil.isBlank(subMsg) ? "用户密码不正确" : subMsg);
    }

}
